package org.boyan.common.util.jsonschema.validate;

import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.boyan.common.util.jsonschema.CommonProperty;
import org.boyan.common.util.jsonschema.a;

/**
 * @author: zhuxiaobao
 * @time: 2021/9/24 15:58
 */

public class LinkDownProperty extends CommonProperty {
    String l;

    List<a> m;

    public String getDictTable() {
        return this.l;
    }

    public void setDictTable(String dictTable) {
        this.l = dictTable;
    }

    public List<a> getOtherColumns() {
        return this.m;
    }

    public void setOtherColumns(List<a> otherColumns) {
        this.m = otherColumns;
    }

    public LinkDownProperty() {}

    public LinkDownProperty(String key, String title, String dictTable) {
        this.b = "string";
        this.e = "link_down";
        this.a = key;
        this.f = title;
        this.l = dictTable;
    }

    @Override
    public Map<String, Object> getPropertyJson() {
        HashMap<Object, Object> hashMap = new HashMap<>();
        hashMap.put("key", getKey());
        JSONObject jSONObject1 = getCommonJson();
        JSONObject jSONObject2 = JSONObject.parseObject(this.l);
        jSONObject1.put("config", jSONObject2);
        jSONObject1.put("others", this.m);
        hashMap.put("prop", jSONObject1);
        return (Map)hashMap;
    }
}